home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsISeekableStream.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  146 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsISeekableStream.idl
  3.  */
  4.  
  5. #ifndef __gen_nsISeekableStream_h__
  6. #define __gen_nsISeekableStream_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17.  
  18. /* starting interface:    nsISeekableStream */
  19. #define NS_ISEEKABLESTREAM_IID_STR "8429d350-1040-4661-8b71-f2a6ba455980"
  20.  
  21. #define NS_ISEEKABLESTREAM_IID \
  22.   {0x8429d350, 0x1040, 0x4661, \
  23.     { 0x8b, 0x71, 0xf2, 0xa6, 0xba, 0x45, 0x59, 0x80 }}
  24.  
  25. class NS_NO_VTABLE nsISeekableStream : public nsISupports {
  26.  public: 
  27.  
  28.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISEEKABLESTREAM_IID)
  29.  
  30.   enum { NS_SEEK_SET = 0 };
  31.  
  32.   enum { NS_SEEK_CUR = 1 };
  33.  
  34.   enum { NS_SEEK_END = 2 };
  35.  
  36.   /**
  37.      *  seek
  38.      *
  39.      *  This method moves the stream offset of the steam implementing this
  40.      *  interface.
  41.      *
  42.      *   @param whence specifies how to interpret the 'offset' parameter in
  43.      *                 setting the stream offset associated with the implementing
  44.      *                 stream.
  45.      *     
  46.      *   @param offset specifies a value, in bytes, that is used in conjunction
  47.      *                 with the 'whence' parameter to set the stream offset of the 
  48.      *                 implementing stream.  A negative value causes seeking in 
  49.      *                 the reverse direction.
  50.      */
  51.   /* void seek (in long whence, in long long offset); */
  52.   NS_IMETHOD Seek(PRInt32 whence, PRInt64 offset) = 0;
  53.  
  54.   /**
  55.      *  tell
  56.      *
  57.      *  This method reports the current offset, in bytes, from the start of the 
  58.      *  stream. 
  59.      */
  60.   /* long long tell (); */
  61.   NS_IMETHOD Tell(PRInt64 *_retval) = 0;
  62.  
  63.   /**
  64.      *  setEOF
  65.      *
  66.      *  This method truncates the stream at the current offset.
  67.      */
  68.   /* void setEOF (); */
  69.   NS_IMETHOD SetEOF(void) = 0;
  70.  
  71. };
  72.  
  73. /* Use this macro when declaring classes that implement this interface. */
  74. #define NS_DECL_NSISEEKABLESTREAM \
  75.   NS_IMETHOD Seek(PRInt32 whence, PRInt64 offset); \
  76.   NS_IMETHOD Tell(PRInt64 *_retval); \
  77.   NS_IMETHOD SetEOF(void); 
  78.  
  79. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  80. #define NS_FORWARD_NSISEEKABLESTREAM(_to) \
  81.   NS_IMETHOD Seek(PRInt32 whence, PRInt64 offset) { return _to Seek(whence, offset); } \
  82.   NS_IMETHOD Tell(PRInt64 *_retval) { return _to Tell(_retval); } \
  83.   NS_IMETHOD SetEOF(void) { return _to SetEOF(); } 
  84.  
  85. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  86. #define NS_FORWARD_SAFE_NSISEEKABLESTREAM(_to) \
  87.   NS_IMETHOD Seek(PRInt32 whence, PRInt64 offset) { return !_to ? NS_ERROR_NULL_POINTER : _to->Seek(whence, offset); } \
  88.   NS_IMETHOD Tell(PRInt64 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Tell(_retval); } \
  89.   NS_IMETHOD SetEOF(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetEOF(); } 
  90.  
  91. #if 0
  92. /* Use the code below as a template for the implementation class for this interface. */
  93.  
  94. /* Header file */
  95. class nsSeekableStream : public nsISeekableStream
  96. {
  97. public:
  98.   NS_DECL_ISUPPORTS
  99.   NS_DECL_NSISEEKABLESTREAM
  100.  
  101.   nsSeekableStream();
  102.  
  103. private:
  104.   ~nsSeekableStream();
  105.  
  106. protected:
  107.   /* additional members */
  108. };
  109.  
  110. /* Implementation file */
  111. NS_IMPL_ISUPPORTS1(nsSeekableStream, nsISeekableStream)
  112.  
  113. nsSeekableStream::nsSeekableStream()
  114. {
  115.   /* member initializers and constructor code */
  116. }
  117.  
  118. nsSeekableStream::~nsSeekableStream()
  119. {
  120.   /* destructor code */
  121. }
  122.  
  123. /* void seek (in long whence, in long long offset); */
  124. NS_IMETHODIMP nsSeekableStream::Seek(PRInt32 whence, PRInt64 offset)
  125. {
  126.     return NS_ERROR_NOT_IMPLEMENTED;
  127. }
  128.  
  129. /* long long tell (); */
  130. NS_IMETHODIMP nsSeekableStream::Tell(PRInt64 *_retval)
  131. {
  132.     return NS_ERROR_NOT_IMPLEMENTED;
  133. }
  134.  
  135. /* void setEOF (); */
  136. NS_IMETHODIMP nsSeekableStream::SetEOF()
  137. {
  138.     return NS_ERROR_NOT_IMPLEMENTED;
  139. }
  140.  
  141. /* End of implementation class template. */
  142. #endif
  143.  
  144.  
  145. #endif /* __gen_nsISeekableStream_h__ */
  146.